import { createApp } from 'vue';
import { createPinia } from 'pinia';
import "@/plugin/index";

import App from './App.vue';
import router, { defalutRoutes } from './router'
import ElementPlus from 'element-plus'
import zhCn from 'element-plus/es/locale/lang/zh-cn'

import menus from "./submenu";
import setRouter from './router/setRouter';

import permission from "@/utils/permission"

import stores from './stores';

import './assets/css/base.scss'
import 'element-plus/dist/index.css';
// setRouter(menus);




const app = createApp(App)

app.use(createPinia())
app.use(router)
app.use(ElementPlus, {
    locale: zhCn,
})

permission.getUserInfoByAdmin(stores)

// stores.useMenuStore().setMenu([...defalutRoutes, ...menus]);

app.mount('#app');


